package learningThread.SpinLock;

public class TestThread extends Thread {

    SpinLock spinLock = new SpinLock();

    public static volatile Integer height = 0;

    @Override
    public void run() {
        spinLock.lock();
        height++;
        System.out.println(Thread.currentThread().getName()+",当前线程进行执行，height:"+height);
        spinLock.unlock();
    }
}
